package com.zlsy.springbootdemo.rabbitmq.consumer;

import com.zlsy.springbootdemo.rabbitmq.stream.Sink;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.stereotype.Component;

/**
 * @author zhouliang
 * @date 2021/1/8 14:46
 */
@Slf4j
@Component
public class OrdinaryConsumer {
  @StreamListener(Sink.ORDINARY_INPUT)
  public void listen(@Payload String message) {
    log.info("{}", message);
  }
}
